<template>
  <div class="Classification">
    <el-main>
      <div>
        <el-form ref="form" :model="form" label-width="50px">
          <el-row>
            <el-col :span="8">
              <div class="grid-content bg-purple">
                <el-form-item label="公司:">
                  <el-input v-model="form.company" style="width:230px;"></el-input>
                </el-form-item>
              </div>
            </el-col>
            <el-col :span="9">
              <div class="grid-content bg-purple">
                <el-form-item label="部门:">
                  <el-select v-model="form.department" placeholder="请选择部门" style="width:230px;">
                    <el-option label="* 市场部" value="marketingDepartment"></el-option>
                    <el-option label="* 销售部" value="salesDepartment"></el-option>
                    <el-option label="* 产品部" value="productDepartment"></el-option>
                    <el-option label="* 研发部" value="researchDepartment"></el-option>
                    <el-option label="* 生产部" value="productDepartment"></el-option>
                    <el-option label="* 人力资源部" value="resourcesDepartment"></el-option>
                  </el-select>
                </el-form-item>
              </div>
            </el-col>
            <el-col :span="3">
              <div class="grid-content bg-purple">
                <el-button type="primary" icon="el-icon-search">搜索</el-button>
              </div>
            </el-col>
            <el-col :span="4">
              <div class="grid-content bg-purple-light">
                <el-button type="primary" icon="el-icon-document">导出</el-button>
              </div>
            </el-col>
          </el-row>
        </el-form>
      </div>
      <el-table
        ref="multipleTable"
        :data="tableData3"
        border
        tooltip-effect="dark"
        style="width: 100%"
        @selection-change="handleSelectionChange"
      >
        <el-table-column prop="number" label="编号" style="width: 16%"></el-table-column>
        <el-table-column prop="statement" label="资产分类" style="width: 16%"></el-table-column>
        <el-table-column prop="InUse" label="在用" style="width: 16%"></el-table-column>
        <el-table-column prop="Idle" label="闲置" style="width: 16%"></el-table-column>
        <el-table-column prop="Scrap" label="已报废" style="width: 16%"></el-table-column>
        <el-table-column prop="total" label="合计" style="width: 16%"></el-table-column>
      </el-table>
      <div class="block">
        <el-row :gutter="20">
          <el-col :span="4">
            <div class="grid-content bg-purple">
              <span class="demonstration">已选择0条</span>
            </div>
          </el-col>
          <el-col :span="10">
            <div class="grid-content bg-purple">
              <el-pagination
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="currentPage4"
                :page-sizes="[10, 20, 30, 40]"
                :page-size="10"
                layout="prev, pager, next, sizes, jumper"
                :total="400"
              ></el-pagination>
            </div>
          </el-col>
        </el-row>
      </div>
    </el-main>
  </div>
</template>
<script>
export default {
  data() {
    return {
      form: {
        company: "",
        department:""
      },
      currentPage1: 5,
      currentPage2: 5,
      currentPage3: 5,
      currentPage4: 4,
      multipleSelection: []
    };
  },
  methods: {
    toggleSelection(rows) {
      if (rows) {
        rows.forEach(row => {
          this.$refs.multipleTable.toggleRowSelection(row);
        });
      } else {
        this.$refs.multipleTable.clearSelection();
      }
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    }
  }
};
</script>
<style lang="scss" scoped>
</style>
